package de.hauschild.gmltracer.tracer;

import org.apache.commons.math.geometry.Vector3D;

/**
 * The properties of the intersected surface.
 * 
 * @author Klaus Hauschild
 * @since 1.0.0
 */
public class SurfaceProperties {

  private final Vector3D color;
  private final double diffuseReflectionCoefficient;
  private final double specularReflectionCoefficient;
  private final double phongExponent;

  /**
   * Instantiates a new surface properties.
   * 
   * @param thePhongExponent
   *          the the phong exponent
   * @param theSpecularReflectionCoefficient
   *          the the specular reflection coefficient
   * @param theDiffuseReflectionCoefficient
   *          the the diffuse reflection coefficient
   * @param theColor
   *          the the color
   */
  public SurfaceProperties(final double thePhongExponent, final double theSpecularReflectionCoefficient,
      final double theDiffuseReflectionCoefficient, final Vector3D theColor) {
    this(theColor, theDiffuseReflectionCoefficient, theSpecularReflectionCoefficient, thePhongExponent);
  }

  /**
   * Instantiates a new surface properties.
   * 
   * @param theColor
   *          the the color
   * @param theDiffuseReflectionCoefficient
   *          the the diffuse reflection coefficient
   * @param theSpecularReflectionCoefficient
   *          the the specular reflection coefficient
   * @param thePhongExponent
   *          the the phong exponent
   */
  public SurfaceProperties(final Vector3D theColor, final double theDiffuseReflectionCoefficient,
      final double theSpecularReflectionCoefficient, final double thePhongExponent) {
    color = theColor;
    diffuseReflectionCoefficient = theDiffuseReflectionCoefficient;
    specularReflectionCoefficient = theSpecularReflectionCoefficient;
    phongExponent = thePhongExponent;
  }

  /**
   * Gets the color.
   * 
   * @return the color
   */
  public Vector3D getColor() {
    return color;
  }

  /**
   * Gets the diffuse reflection coefficient.
   * 
   * @return the diffuse reflection coefficient
   */
  public double getDiffuseReflectionCoefficient() {
    return diffuseReflectionCoefficient;
  }

  /**
   * Gets the phong exponent.
   * 
   * @return the phong exponent
   */
  public double getPhongExponent() {
    return phongExponent;
  }

  /**
   * Gets the specular reflection coefficient.
   * 
   * @return the specular reflection coefficient
   */
  public double getSpecularReflectionCoefficient() {
    return specularReflectionCoefficient;
  }
}
